using System;

namespace NCommet.Core.Agents
{
    /// <summary>
    /// IDaoEventsListener receives events from <see cref="NCommet.Core.Agents.IDaoEventsSink" />.
    /// </summary>
    public interface IDaoEventsListener
    {
        /// <summary>
        /// Called when an item has been saved.
        /// </summary>
        /// <param name="item">The given <see cref="NCommet.Core.Item" /></param>
        void ItemSaved(Item item);

        /// <summary>
        /// Called when an item has been deleted.
        /// </summary>
        /// <param name="item">The given <see cref="NCommet.Core.Item" /></param>
        void ItemDeleted(Item item);

        /// <summary>
        /// Called before an item gets saved.
        /// </summary>
        /// <param name="item">The given <see cref="NCommet.Core.Item" /></param>
        void ItemSaving(Item item);
    }
}